﻿using System;
using System.Collections.Generic;

namespace YArchitech.Plumbing
{
	public class RadiatorData
	{
		public RadiatorData()
		{
		}

		public RadiatorData(RadiatorData radiatorData)
		{
			this.typeRadiator = radiatorData.typeRadiator;
			this.connDiameter = radiatorData.connDiameter;
			this.load = radiatorData.load;
			this.flow = radiatorData.flow;
			this.resistance = radiatorData.resistance;
			this.tempCalc = radiatorData.tempCalc;
			this.resistTCValve = radiatorData.resistTCValve;
			this.opening = radiatorData.opening;
			this.number = radiatorData.number;
			this.pressCapital = radiatorData.pressCapital;
			this.pressActual = radiatorData.pressActual;
			this.rateUnbalance = radiatorData.rateUnbalance;
			this.valvesList = this.InitialValveAndFittings(radiatorData.valvesList);
		}

		private IList<ValveAndFitting> InitialValveAndFittings(IList<ValveAndFitting> listVaF)
		{
			IList<ValveAndFitting> list = new List<ValveAndFitting>();
			if (listVaF == null || listVaF.Count < 1)
			{
				return list;
			}
			foreach (ValveAndFitting valveAndFitting in listVaF)
			{
				ValveAndFitting item = new ValveAndFitting(valveAndFitting);
				list.Add(item);
			}
			return list;
		}

		public int TypeRadiator
		{
			get
			{
				return this.typeRadiator;
			}
			set
			{
				this.typeRadiator = value;
			}
		}

		public double ConnDiameter
		{
			get
			{
				return this.connDiameter;
			}
			set
			{
				this.connDiameter = value;
			}
		}

		public double Load
		{
			get
			{
				return this.load;
			}
			set
			{
				this.load = value;
			}
		}

		public double Flow
		{
			get
			{
				return this.flow;
			}
			set
			{
				this.flow = value;
			}
		}

		public double Resistance
		{
			get
			{
				return this.resistance;
			}
			set
			{
				this.resistance = value;
			}
		}

		public double TempCalc
		{
			get
			{
				return this.tempCalc;
			}
			set
			{
				this.tempCalc = value;
			}
		}

		public double ResistTcValve
		{
			get
			{
				return this.resistTCValve;
			}
			set
			{
				this.resistTCValve = value;
			}
		}

		public double Opening
		{
			get
			{
				return this.opening;
			}
			set
			{
				this.opening = value;
			}
		}

		public int Number
		{
			get
			{
				return this.number;
			}
			set
			{
				this.number = value;
			}
		}

		public double PressCapital
		{
			get
			{
				return this.pressCapital;
			}
			set
			{
				this.pressCapital = value;
			}
		}

		public double PressActual
		{
			get
			{
				return this.pressActual;
			}
			set
			{
				this.pressActual = value;
			}
		}

		public double RateUnbalance
		{
			get
			{
				return this.rateUnbalance;
			}
			set
			{
				this.rateUnbalance = value;
			}
		}

		public IList<ValveAndFitting> ValvesList
		{
			get
			{
				return this.valvesList;
			}
			set
			{
				this.valvesList = value;
			}
		}

		private int typeRadiator;

		private double connDiameter;

		private double load;

		private double flow;

		private double resistance;

		private double tempCalc;

		private double resistTCValve;

		private double opening;

		private int number;

		private double pressCapital;

		private double pressActual;

		private double rateUnbalance;

		private IList<ValveAndFitting> valvesList;
	}
}
